-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zmq4: make number of retries for dial configurable #126
zmq4: make number of retries for dial configurable #126
Conversation
Codecov Report
@@ Coverage Diff @@
## main #126 +/- ##
==========================================
+ Coverage 67.63% 68.18% +0.54%
==========================================
Files 29 29
Lines 1817 1820 +3
==========================================
+ Hits 1229 1241 +12
+ Misses 488 480 -8
+ Partials 100 99 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good.
thanks for the PR.
3c0aab3
to
e480f8f
Compare
I just fixed the test |
please rebase off the latest |
e480f8f
to
f209f63
Compare
@sbinet the |
yeah, it's been flaky (the whole IPC transport actually). |
c8c471d
to
c33556f
Compare
thanks, but this commit disables |
socket_test.go
Outdated
func TestConnMaxRetries(t *testing.T) { | ||
retryCount := 123 | ||
socket := zmq4.NewSub(context.Background(), zmq4.WithDialerRetry(time.Microsecond), zmq4.WithDialerMaxRetries(retryCount)) | ||
testTransport.init() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sharing testTransport
across tests feels like it may be a gun looking for a foot :)
(especially as we are relying on a specific value of dialCalledCount
, shared across tests/transport)
perhaps register a specific transportMock
value, together with a specific fake transport name, say "test-maxretries"
(and "test-maxretries-infty"
or something)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good point, I gave each test a own transport
d75dc65
to
ceebe76
Compare
ceebe76
to
03b1695
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
see #85